Tables [dbo].[OrderProductCategoryLookup]
Properties
PropertyValue
Row Count15
Created10:31:30 AM Tuesday, March 02, 2010
Last Modified11:40:05 AM Monday, February 20, 2012
Columns
NameData TypeMax Length (Bytes)Allow Nulls
Cluster Primary Key PK_OrderProductCategoryLookup: OrderProductID\OrderCategoryIDForeign Keys FK_OrderProductCategoryLookup_OrderProduct: [dbo].[OrderProduct].OrderProductIDOrderProductIDint4
No
Cluster Primary Key PK_OrderProductCategoryLookup: OrderProductID\OrderCategoryIDForeign Keys FK_OrderProductCategoryLookup_OrderCategory: [dbo].[OrderCategory].OrderCategoryIDOrderCategoryIDint4
No
IsFeaturedbit1
No
SortOrderint4
No
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_OrderProductCategoryLookup: OrderProductID\OrderCategoryIDPK_OrderProductCategoryLookupOrderProductID, OrderCategoryID
Yes
Foreign Keys Foreign Keys
NameUpdateDeleteColumns
FK_OrderProductCategoryLookup_OrderCategoryCascadeCascadeOrderCategoryID->[dbo].[OrderCategory].[OrderCategoryID]
FK_OrderProductCategoryLookup_OrderProductCascadeCascadeOrderProductID->[dbo].[OrderProduct].[OrderProductID]
SQL Script
CREATE TABLE [dbo].[OrderProductCategoryLookup]
(
[OrderProductID] [int] NOT NULL,
[OrderCategoryID] [int] NOT NULL,
[IsFeatured] [bit] NOT NULL,
[SortOrder] [int] NOT NULL
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[OrderProductCategoryLookup] ADD CONSTRAINT [PK_OrderProductCategoryLookup] PRIMARY KEY CLUSTERED ([OrderProductID], [OrderCategoryID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OrderProductCategoryLookup] ADD CONSTRAINT [FK_OrderProductCategoryLookup_OrderCategory] FOREIGN KEY ([OrderCategoryID]) REFERENCES [dbo].[OrderCategory] ([OrderCategoryID]) ON DELETE CASCADE ON UPDATE CASCADE
GO
ALTER TABLE [dbo].[OrderProductCategoryLookup] ADD CONSTRAINT [FK_OrderProductCategoryLookup_OrderProduct] FOREIGN KEY ([OrderProductID]) REFERENCES [dbo].[OrderProduct] ([OrderProductID]) ON DELETE CASCADE ON UPDATE CASCADE
GO
Uses
Used By